#pragma once
#ifndef PARSER_H
#define PARSER_H

#include "headers.h"



class Parser
{
public:
    Parser(InfoWnd*);
    bool ParseFile(QString);
    bool LoadParserTable(QString);
    Error GetLastError();

private:
    InfoWnd* infoWnd;

    MapWithPairKey SymbolTable;

    LexicalAnalyzer lex;
    SyntacticAnalysis synt;


    Grammar grammar;

    QString defPTfile;

    void PrintParserTables();
    void PrintLexemes(QList<Lexeme>*);
};

#endif // PARSER_H
